#pragma once
#include <immintrin.h>
class BigEndianUnsignedInteger
{
	unsigned value;
public:
	inline operator unsigned()const
	{
		return _load_be_u32(&value);
	}
	inline unsigned operator=(unsigned v)
	{
		_store_be_u32(&value, v);
		return v;
	}
};
class BigEndianUnsignedLong
{
	unsigned __int64 value;
public:
	inline operator unsigned __int64()const
	{
		return _load_be_u64(&value);
	}
	inline unsigned __int64 operator=(unsigned __int64 v)
	{
		_store_be_u64(&value, v);
		return v;
	}
};
class BigEndianUnsignedShort
{
	unsigned short value;
public:
	inline operator unsigned short()const
	{
		return _load_be_u16(&value);
	}
	inline unsigned short operator=(unsigned short v)
	{
		_store_be_u16(&value, v);
		return v;
	}
};